//
//  JSBusiness.h
//  JSKit
//
//  Created by Apple on 2019/7/21.
//  Copyright © 2019 Apple. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, JSNetworkStatus)
{
    /*! 未知网络 */
    JSNetworkStatusUnknown           = 0,
    /*! 没有网络 */
    JSNetworkStatusNotReachable,
    /*! 手机 3G/4G 网络 */
    JSNetworkStatusReachableViaWWAN,
    /*! wifi 网络 */
    JSNetworkStatusReachableViaWiFi
};

@protocol JSBusinessDelegate <NSObject>

@optional
/**
 * 网络发生变化
 */
-(void)appNetWorkDidChange:(JSNetworkStatus) networkStatus;
/**
 * 全局定时器回调 1秒一次
 */
-(void)appGroupTimer;

@end

@interface JSBusiness : NSObject

@property (nonatomic, assign, readonly) BOOL isDebug;

/**
 * App 运行总时长 根据内部定期器自动叠加
 */
@property (nonatomic, assign, readonly) NSUInteger runTime;
/**
 * 当前App版本
 */
@property (nonatomic, strong, readonly) NSString *appVersion;
/**
 * 当前App版本
 */
@property (nonatomic, strong, readonly) NSString *buildVersion;
/**
 * 当前系统版本
 */
@property (nonatomic, strong, readonly) NSString *systemVersion;
/**
 * 手机型号
 */
@property (nonatomic, strong, readonly) NSString *phoneModel;
/**
 * App 名称
 */
@property (nonatomic, strong, readonly) NSString *appName;
/**
 * App bundleId
 */
@property (nonatomic, strong, readonly) NSString *bundleId;
/**
 * 当前网络状态
 */
@property (nonatomic, assign, readonly) JSNetworkStatus currentNetworkStatus;
@property (nonatomic, assign) NSNumber *currentNetworkStatusObj;




@property (nonatomic, weak) id<JSBusinessDelegate> delegate;



+ (instancetype)sharedInstance;



@end

NS_ASSUME_NONNULL_END
